Integrand size = 15, antiderivative size = 29 \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=-\frac {b \cos (c+d x)}{d}+a \operatorname {CosIntegral}(d x) \sin (c)+a \cos (c) \text {Si}(d x) \]
Time = 0.07 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.38 \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=-\frac {b \cos (c) \cos (d x)}{d}+a \operatorname {CosIntegral}(d x) \sin (c)+\frac {b \sin (c) \sin (d x)}{d}+a \cos (c) \text {Si}(d x) \]
-((b*Cos[c]*Cos[d*x])/d) + a*CosIntegral[d*x]*Sin[c] + (b*Sin[c]*Sin[d*x]) /d + a*Cos[c]*SinIntegral[d*x]
Time = 0.30 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {7293, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a+b x) \sin (c+d x)}{x} \, dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {a \sin (c+d x)}{x}+b \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a \sin (c) \operatorname {CosIntegral}(d x)+a \cos (c) \text {Si}(d x)-\frac {b \cos (c+d x)}{d}\) |
3.1.5.3.1 Defintions of rubi rules used
Time = 0.14 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.07
method | result | size |
derivativedivides | \(a \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )-\frac {b \cos \left (d x +c \right )}{d}\) | \(31\) |
default | \(a \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )-\frac {b \cos \left (d x +c \right )}{d}\) | \(31\) |
risch | \(\frac {i a \,{\mathrm e}^{i c} \operatorname {Ei}_{1}\left (-i d x \right )}{2}-\frac {\pi \,\operatorname {csgn}\left (d x \right ) {\mathrm e}^{-i c} a}{2}+\operatorname {Si}\left (d x \right ) {\mathrm e}^{-i c} a -\frac {i {\mathrm e}^{-i c} \operatorname {Ei}_{1}\left (-i d x \right ) a}{2}-\frac {b \cos \left (d x +c \right )}{d}\) | \(70\) |
meijerg | \(\frac {b \sin \left (c \right ) \sin \left (d x \right )}{d}+\frac {b \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (d x \right )}{\sqrt {\pi }}\right )}{d}+\frac {a \sqrt {\pi }\, \sin \left (c \right ) \left (\frac {2 \gamma +2 \ln \left (x \right )+\ln \left (d^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{2}+a \cos \left (c \right ) \operatorname {Si}\left (d x \right )\) | \(101\) |
Time = 0.27 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.10 \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=\frac {a d \operatorname {Ci}\left (d x\right ) \sin \left (c\right ) + a d \cos \left (c\right ) \operatorname {Si}\left (d x\right ) - b \cos \left (d x + c\right )}{d} \]
Time = 2.61 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.28 \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=- a \left (- \sin {\left (c \right )} \operatorname {Ci}{\left (d x \right )} - \cos {\left (c \right )} \operatorname {Si}{\left (d x \right )}\right ) - b \left (\begin {cases} - x \sin {\left (c \right )} & \text {for}\: d = 0 \\\frac {\cos {\left (c + d x \right )}}{d} & \text {otherwise} \end {cases}\right ) \]
-a*(-sin(c)*Ci(d*x) - cos(c)*Si(d*x)) - b*Piecewise((-x*sin(c), Eq(d, 0)), (cos(c + d*x)/d, True))
Result contains complex when optimal does not.
Time = 0.26 (sec) , antiderivative size = 522, normalized size of antiderivative = 18.00 \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=-\frac {1}{2} \, {\left ({\left (i \, E_{1}\left (i \, d x\right ) - i \, E_{1}\left (-i \, d x\right )\right )} \cos \left (c\right ) + {\left (E_{1}\left (i \, d x\right ) + E_{1}\left (-i \, d x\right )\right )} \sin \left (c\right )\right )} a + \frac {{\left ({\left (i \, E_{1}\left (i \, d x\right ) - i \, E_{1}\left (-i \, d x\right )\right )} \cos \left (c\right ) + {\left (E_{1}\left (i \, d x\right ) + E_{1}\left (-i \, d x\right )\right )} \sin \left (c\right )\right )} b c}{2 \, d} - \frac {{\left (2 \, {\left (d x + c\right )} {\left (\cos \left (c\right )^{2} + \sin \left (c\right )^{2}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (d x + c\right )} {\left (\cos \left (c\right )^{2} + \sin \left (c\right )^{2}\right )} \cos \left (d x + c\right ) - {\left (c {\left (E_{2}\left (i \, d x\right ) + E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right )^{3} + c {\left (E_{2}\left (i \, d x\right ) + E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right ) \sin \left (c\right )^{2} - c {\left (i \, E_{2}\left (i \, d x\right ) - i \, E_{2}\left (-i \, d x\right )\right )} \sin \left (c\right )^{3} + c {\left (E_{2}\left (i \, d x\right ) + E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right ) - {\left (c {\left (i \, E_{2}\left (i \, d x\right ) - i \, E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right )^{2} + c {\left (i \, E_{2}\left (i \, d x\right ) - i \, E_{2}\left (-i \, d x\right )\right )}\right )} \sin \left (c\right )\right )} \cos \left (d x + c\right )^{2} - {\left (c {\left (E_{2}\left (i \, d x\right ) + E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right )^{3} + c {\left (E_{2}\left (i \, d x\right ) + E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right ) \sin \left (c\right )^{2} - c {\left (i \, E_{2}\left (i \, d x\right ) - i \, E_{2}\left (-i \, d x\right )\right )} \sin \left (c\right )^{3} - 2 \, {\left (d x + c\right )} {\left (\cos \left (c\right )^{2} + \sin \left (c\right )^{2}\right )} \cos \left (d x + c\right ) + c {\left (E_{2}\left (i \, d x\right ) + E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right ) - {\left (c {\left (i \, E_{2}\left (i \, d x\right ) - i \, E_{2}\left (-i \, d x\right )\right )} \cos \left (c\right )^{2} + c {\left (i \, E_{2}\left (i \, d x\right ) - i \, E_{2}\left (-i \, d x\right )\right )}\right )} \sin \left (c\right )\right )} \sin \left (d x + c\right )^{2}\right )} b}{4 \, {\left ({\left ({\left (d x + c\right )} {\left (\cos \left (c\right )^{2} + \sin \left (c\right )^{2}\right )} d - {\left (c \cos \left (c\right )^{2} + c \sin \left (c\right )^{2}\right )} d\right )} \cos \left (d x + c\right )^{2} + {\left ({\left (d x + c\right )} {\left (\cos \left (c\right )^{2} + \sin \left (c\right )^{2}\right )} d - {\left (c \cos \left (c\right )^{2} + c \sin \left (c\right )^{2}\right )} d\right )} \sin \left (d x + c\right )^{2}\right )}} \]
-1/2*((I*exp_integral_e(1, I*d*x) - I*exp_integral_e(1, -I*d*x))*cos(c) + (exp_integral_e(1, I*d*x) + exp_integral_e(1, -I*d*x))*sin(c))*a + 1/2*((I *exp_integral_e(1, I*d*x) - I*exp_integral_e(1, -I*d*x))*cos(c) + (exp_int egral_e(1, I*d*x) + exp_integral_e(1, -I*d*x))*sin(c))*b*c/d - 1/4*(2*(d*x + c)*(cos(c)^2 + sin(c)^2)*cos(d*x + c)^3 + 2*(d*x + c)*(cos(c)^2 + sin(c )^2)*cos(d*x + c) - (c*(exp_integral_e(2, I*d*x) + exp_integral_e(2, -I*d* x))*cos(c)^3 + c*(exp_integral_e(2, I*d*x) + exp_integral_e(2, -I*d*x))*co s(c)*sin(c)^2 - c*(I*exp_integral_e(2, I*d*x) - I*exp_integral_e(2, -I*d*x ))*sin(c)^3 + c*(exp_integral_e(2, I*d*x) + exp_integral_e(2, -I*d*x))*cos (c) - (c*(I*exp_integral_e(2, I*d*x) - I*exp_integral_e(2, -I*d*x))*cos(c) ^2 + c*(I*exp_integral_e(2, I*d*x) - I*exp_integral_e(2, -I*d*x)))*sin(c)) *cos(d*x + c)^2 - (c*(exp_integral_e(2, I*d*x) + exp_integral_e(2, -I*d*x) )*cos(c)^3 + c*(exp_integral_e(2, I*d*x) + exp_integral_e(2, -I*d*x))*cos( c)*sin(c)^2 - c*(I*exp_integral_e(2, I*d*x) - I*exp_integral_e(2, -I*d*x)) *sin(c)^3 - 2*(d*x + c)*(cos(c)^2 + sin(c)^2)*cos(d*x + c) + c*(exp_integr al_e(2, I*d*x) + exp_integral_e(2, -I*d*x))*cos(c) - (c*(I*exp_integral_e( 2, I*d*x) - I*exp_integral_e(2, -I*d*x))*cos(c)^2 + c*(I*exp_integral_e(2, I*d*x) - I*exp_integral_e(2, -I*d*x)))*sin(c))*sin(d*x + c)^2)*b/(((d*x + c)*(cos(c)^2 + sin(c)^2)*d - (c*cos(c)^2 + c*sin(c)^2)*d)*cos(d*x + c)^2 + ((d*x + c)*(cos(c)^2 + sin(c)^2)*d - (c*cos(c)^2 + c*sin(c)^2)*d)*sin...
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.29 (sec) , antiderivative size = 339, normalized size of antiderivative = 11.69 \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=-\frac {a d \Im \left ( \operatorname {Ci}\left (d x\right ) \right ) \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - a d \Im \left ( \operatorname {Ci}\left (-d x\right ) \right ) \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, a d \operatorname {Si}\left (d x\right ) \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - 2 \, a d \Re \left ( \operatorname {Ci}\left (d x\right ) \right ) \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - 2 \, a d \Re \left ( \operatorname {Ci}\left (-d x\right ) \right ) \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - a d \Im \left ( \operatorname {Ci}\left (d x\right ) \right ) \tan \left (\frac {1}{2} \, d x\right )^{2} + a d \Im \left ( \operatorname {Ci}\left (-d x\right ) \right ) \tan \left (\frac {1}{2} \, d x\right )^{2} - 2 \, a d \operatorname {Si}\left (d x\right ) \tan \left (\frac {1}{2} \, d x\right )^{2} + a d \Im \left ( \operatorname {Ci}\left (d x\right ) \right ) \tan \left (\frac {1}{2} \, c\right )^{2} - a d \Im \left ( \operatorname {Ci}\left (-d x\right ) \right ) \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, a d \operatorname {Si}\left (d x\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - 2 \, a d \Re \left ( \operatorname {Ci}\left (d x\right ) \right ) \tan \left (\frac {1}{2} \, c\right ) - 2 \, a d \Re \left ( \operatorname {Ci}\left (-d x\right ) \right ) \tan \left (\frac {1}{2} \, c\right ) - a d \Im \left ( \operatorname {Ci}\left (d x\right ) \right ) + a d \Im \left ( \operatorname {Ci}\left (-d x\right ) \right ) - 2 \, a d \operatorname {Si}\left (d x\right ) - 2 \, b \tan \left (\frac {1}{2} \, d x\right )^{2} - 8 \, b \tan \left (\frac {1}{2} \, d x\right ) \tan \left (\frac {1}{2} \, c\right ) - 2 \, b \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, b}{2 \, {\left (d \tan \left (\frac {1}{2} \, d x\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + d \tan \left (\frac {1}{2} \, d x\right )^{2} + d \tan \left (\frac {1}{2} \, c\right )^{2} + d\right )}} \]
-1/2*(a*d*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*d*i mag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*d*sin_integ ral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a*d*real_part(cos_integral(d*x))* tan(1/2*d*x)^2*tan(1/2*c) - 2*a*d*real_part(cos_integral(-d*x))*tan(1/2*d* x)^2*tan(1/2*c) - a*d*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2 + a*d*im ag_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 2*a*d*sin_integral(d*x)*tan(1 /2*d*x)^2 + a*d*imag_part(cos_integral(d*x))*tan(1/2*c)^2 - a*d*imag_part( cos_integral(-d*x))*tan(1/2*c)^2 + 2*a*d*sin_integral(d*x)*tan(1/2*c)^2 + 2*b*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a*d*real_part(cos_integral(d*x))*tan(1 /2*c) - 2*a*d*real_part(cos_integral(-d*x))*tan(1/2*c) - a*d*imag_part(cos _integral(d*x)) + a*d*imag_part(cos_integral(-d*x)) - 2*a*d*sin_integral(d *x) - 2*b*tan(1/2*d*x)^2 - 8*b*tan(1/2*d*x)*tan(1/2*c) - 2*b*tan(1/2*c)^2 + 2*b)/(d*tan(1/2*d*x)^2*tan(1/2*c)^2 + d*tan(1/2*d*x)^2 + d*tan(1/2*c)^2 + d)
Timed out. \[ \int \frac {(a+b x) \sin (c+d x)}{x} \, dx=a\,\mathrm {cosint}\left (d\,x\right )\,\sin \left (c\right )+a\,\mathrm {sinint}\left (d\,x\right )\,\cos \left (c\right )-\frac {b\,\cos \left (c+d\,x\right )}{d} \]